package stattracker;

import java.util.TreeMap;

public class Halo3Data extends GameData
{
	private static final long serialVersionUID = 1L;
	private TreeMap<Long, Halo3GameData> games;
	private Halo3Stats stats;
	private Halo3User h3Images;
	
	public Halo3Data(String gamertag)
	{
		super(gamertag);
		games = new TreeMap<Long, Halo3GameData>();
		
		stats = new Halo3Stats(gamertag);
		h3Images = new Halo3User(gamertag);
	}
	
	public Halo3User getImages()
	{
		return h3Images;
	}
	
	public Halo3Stats getHalo3Stats()
	{
		return stats;
	}
	
	public void compileStatistics()
	{
		moreUpdate();
		stats.compileStats(games);
		lessUpdate();
	}
	
	public TreeMap<Long, Halo3GameData> getGames()
	{
		return games;
	}
	
	public boolean hasSeen(long id)
	{
		return games.containsKey(id);
	}
	
	public boolean addGame(Halo3GameData g)
	{
		if(games.containsKey(g.getID()))
			return false;
		games.put(g.getID(), g);
		return true;
	}

}
